package com.softwareconstruction.service;

import com.softwareconstruction.model.Paper;
import com.softwareconstruction.exception.NoEnoughPapersException;
import java.util.ArrayList;
import java.util.List;

public class PaperList {
    private List<Paper> papers;
    
    public PaperList() {
        this.papers = new ArrayList<>();
    }
    
    public void addPaper(Paper paper) {
        papers.add(paper);
    }
    
    public List<Paper> selectPapers(SelectionStrategy strategy, int requiredCount) throws NoEnoughPapersException {
        return strategy.selectPapers(papers, requiredCount);
    }
    
    public int getPaperCount() {
        return papers.size();
    }
}